import requests
import json

headers = {
    'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36'
}

with open('xing.json','r',encoding='utf-8') as file:
    data = json.load(file)
    chapterViewList = data["result"]["chapterList"][0]["chapterViewList"]
    num = 0
    for i in chapterViewList:
        num = num + 1
        if num < 3:
            url = 'https://read.zongheng.com/chapter/1330759/'+str(i["chapterId"])+'.html'
            response = requests.get(url=url, headers=headers)
            print(response.content.decode("utf-8"))

